home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12272 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.clark.net!not-for-mail
  2. From: gusty@clark.net (Harlan Messinger)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP: argc & argv to globals
  5. Date: 19 Mar 1996 04:19:52 GMT
  6. Organization: Clark Internet Services, Inc., Ellicott City, MD USA
  7. Message-ID: <4ilcl8$3q0@clarknet.clark.net>
  8. References: <314de637.14063528@news.alpha.net>
  9. NNTP-Posting-Host: explorer.clark.net
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Newsreader: TIN [UNIX 1.3 950726BETA PL0]
  14.  
  15. Gabriel Millerd (cthulhu@nomad.net) wrote:
  16. : Can someone email me a snibit of converting argv[] to a global
  17. : variable? I have been trying and trying.
  18. : All I want to do is have argv[] accessable by functions outside of
  19. : main()
  20. : Thanks
  21.  
  22. You can't. argv is the conventional name of a parameter of the function 
  23. main. It is therefore local to main, just as any function's parameters 
  24. are, by name, local to the function.
  25.  
  26. There may be a way to access the command line by some (globally 
  27. available) means, but that would be platform-dependent.
  28.  
  29.